
	u "data/panel_mafiaconsmig", clear
	
	
	drop if iddecade==1|iddecade==4 // 1951 / 1981

**-----------------------------------------------------
			
	* Appendix C: Linearity assumption

**-----------------------------------------------------
	
*Figure C.1: Linear interaction diagnostic plot

	reghdfe empcp, absorb(municipalities iddecade) resid
	predict empcp_r, resid	
	label var empcp_r "Employment Constr Residualized"

	reghdfe migshare, absorb(municipalities iddecade) resid
	predict mig_r, res
	xtile mig=mig_r, n(3)
		
	reghdfe em, absorb(municipalities iddecade) resid
	predict em_r, res
	
	reghdfe newspc, absorb(municipalities iddecade) resid
	predict news_r, res
	
	
	tw (scatter news_r empcp_r)(lfit news_r empcp_r, lcolor(red))(lowess news_r empcp_r, lcolor(plb3)), name(c0a, replace) legend(off) ytitle(Mafia-related news residualized) xtitle(Empl Constr residualized)
		 graph export "figures/figureC1a.pdf", as(pdf) replace
		 
tw (scatter news_r em_r)(lfit news_r em_r, lcolor(red))(lowess news_r em_r, lcolor(plb3)), name(c0a, replace) legend(off) ytitle(Mafia-related news residualized) xtitle(Emp Constr x Migr residualized)
		 graph export "figures/figureC1b.pdf", as(pdf) replace


	  tw (scatter news_r empcp_r)(lfit news_r empcp_r, lcolor(red))(lowess  news_r empcp_r, lcolor(plb3)) if mig==1, name(c1, replace) legend(off) title(Migration Low) ytitle(Mafia-related news per capita)
	 tw (scatter news_r empcp_r)(lfit news_r empcp_r, lcolor(red))(lowess  news_r empcp_r, lcolor(plb3)) if mig==2, name(c2, replace) legend(off) title(Migration Medium)
	 tw (scatter news_r empcp_r)(lfit news_r empcp_r, lcolor(red))(lowess  news_r empcp_r, lcolor(plb3)) if mig==3, name(c3, replace) legend(off) title(Migration High)
	 	 graph combine c1 c2 c3, col(3) ycommon
	 graph export "figures/figureC2.pdf", as(pdf) replace
	 